import request from "@/utils/request";

enum API {
    SKU_URL = '/admin/product/list/',
    SALE_URL = '/admin/product/onSale/',
    CANCELSALE_URL = '/admin/product/cancelSale/',
    SKUINFO_URL = '/admin/product/getSkuInfo/',
    DELETESKU_URL = '/admin/product/deleteSku/'
}

// 获取当前商品sku的接口
export const reqSkuList = (page: any, limit: any) => request.get<any, any>(API.SKU_URL + `${page}/${limit}`)

// 已有商品的上架的请求
export const reqSaleSku = (skuId: any) => request.get<any, any>(API.SALE_URL + skuId)

// 已有商品的下架的请求
export const reqCancelSale = (skuId: any) => request.get<any, any>(API.CANCELSALE_URL + skuId)

// 获取商品详情的接口
export const reqSkuInfo = (skuId: any) => request.get<any, any>(API.SKUINFO_URL + skuId)

// 删除某一个已有的sku
export const reqRemoveSku = (skuId: any) => request.delete<any, any>(API.DELETESKU_URL + skuId)






































